package com.dx.financehy.modules.business.mapper;

import com.dx.financehy.config.mp.EasyBaseMapper;
import com.dx.financehy.modules.business.domain.BusinessTwo;
import com.dx.financehy.modules.business.domain.dto.AddBusinessTwoDTO;
import com.dx.financehy.modules.business.domain.dto.EditBusinessTwoDTO;
import com.dx.financehy.modules.system.domain.vo.BusinessTwoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author: huang_jigao
 * @Title: BusinessMapper
 * @ProjectName: financehy
 * @Description:
 * @date: 2024-05-14 8:48
 */
@Mapper
public interface BusinessTwoMapper extends EasyBaseMapper<BusinessTwo> {

    /**
     * 获取主营业务二级分类
     *
     * @param businessIds
     * @return
     */
    List<BusinessTwoVO> getEditBusinessList(@Param("businessIds") List<String> businessIds);

    int addBusiness(@Param("list") List<AddBusinessTwoDTO> twoDTOS,
                         @Param("userId") String userId,
                         @Param("createTime") Date createTime);

    /**
     * 编辑主营业务
     *
     * @param editBusinessTwoInternals
     * @param userId
     * @param updateTime
     * @return
     */
    int editBusiness(@Param("list") List<EditBusinessTwoDTO.EditBusinessTwoInternal> editBusinessTwoInternals,
                     @Param("userId") String userId,
                     @Param("updateTime") Date updateTime);
}
